package com.zycfc.zsf.boot.office.excel.bean;

import java.io.*;
import org.apache.poi.ss.usermodel.*;

public class ExcelExportResponse implements Serializable
{
    private static final long serialVersionUID = 1L;
    private static final int SUCCESS = 0;
    private static final int ERROR = -1;
    private int retCode;
    private String retMsg;
    private Workbook retWorkbook;
    private String excelUploadPath;
    private Exception exception;
    
    public ExcelExportResponse() {
        this.setRetCode(0);
    }
    
    public ExcelExportResponse(final Workbook retWorkbook) {
        this.setRetWorkbook(retWorkbook);
        this.setRetCode(0);
    }
    
    public ExcelExportResponse(final int retCode, final String retMsg, final Workbook retWorkbook) {
        this.setRetCode(retCode);
        this.setRetMsg(retMsg);
        this.setRetWorkbook(retWorkbook);
    }
    
    public ExcelExportResponse(final String retMsg) {
        this.setRetCode(-1);
        this.setRetMsg(retMsg);
    }
    
    public ExcelExportResponse(final Exception e) {
        this.setRetCode(-1);
        this.setRetMsg(e.getMessage());
        this.setException(e);
    }
    
    public ExcelExportResponse(final int retCode, final String retMsg, final String excelUploadPath) {
        this.setRetCode(retCode);
        this.setRetMsg(retMsg);
        this.setExcelUploadPath(excelUploadPath);
    }
    
    public int getRetCode() {
        return this.retCode;
    }
    
    public void setRetCode(final int retCode) {
        this.retCode = retCode;
    }
    
    public String getRetMsg() {
        return this.retMsg;
    }
    
    public void setRetMsg(final String retMsg) {
        this.retMsg = retMsg;
    }
    
    public Workbook getRetWorkbook() {
        return this.retWorkbook;
    }
    
    public void setRetWorkbook(final Workbook retWorkbook) {
        this.retWorkbook = retWorkbook;
    }
    
    public Exception getException() {
        return this.exception;
    }
    
    public void setException(final Exception exception) {
        this.exception = exception;
    }
    
    public String getExcelUploadPath() {
        return this.excelUploadPath;
    }
    
    public void setExcelUploadPath(final String excelUploadPath) {
        this.excelUploadPath = excelUploadPath;
    }
}
